home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
maximus
/
mul100.zip
/
RDUSR.SCR
< prev
next >
Wrap
Text File
|
1993-02-01
|
2KB
|
45 lines
// RDUSR.SCR -- Read and Display a Maximus User file -- Version 1.00
//
// Script program for MUL - the Maximus User Language
// MUL is (C) Copyright 1990-93 by CodeLand Australia
//
// USAGE: MUL -pRdUsr or
// MUL -pRdUsr <Priv>
// RdUsr is based on the utility of the same name, released into the SDSMAX
// file distribution area. Sorry I'm not aware of the Author's name, though
// he lists his wife's BBS as Prism BBS, Fidonet 1:272/38. In his words..
// This is a very simple little utility to read users from a Max. user.bbs
// file and output their priv. levels, names, addresses and phone numbers
// to stdout. It takes one optional parameter - the first letter (or more)
// of the priv. level you want to output. If there are no command line
// parameters then it outputs all users.
char *ufile = "USER.BBS"; // Path & name of Maximus user file
//char *ufile = "C:\\BBS\\USER.BBS"; // Path & name of Maximus user file
main (int argc, char *arg1) // Main program
{
int rec=1; // Current record number
char pletter, priv[10]; // Work variables
if (!BaseOpenR (ufile)) {
printf ("ERROR opening user file %s\n",ufile);
exit ();
}
if (argc) pletter=toupper (arg1[0]);
while (BaseRead (rec++)) {
strcpy (priv,BasePrivStr (USRpriv));
if(!argc || pletter == priv[0])
printf ("%c %-20s %-24s %s\n",priv[0],USRname,USRcity,USRphone);
}
BaseClose (); // Close the user base
}
// End of script